package com.example.unisys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.unisys.entity.School;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Repository
public interface SchoolMapper extends BaseMapper<School> {

    int insert(School school);

    int insertSelective(School school);

    int update(School school);

    School getById(@Param("school_id")int school_id);

    int getAllSchoolSum();

    int getSchoolByMain(@Param("main_school") String main_school);

    School getSchool(@Param("main_school")String main_school,@Param("sub_school")String sub_school);


    List<School> getAllSchools(HashMap<String, Object> hs);

    int deleteSchool(HashMap<String, Object> hs);


    ArrayList<String> getMainSchools();

    ArrayList<String> getSubSchools(String main_school);
}
